import React, {useEffect, useState} from 'react';
import './header.css'
import {useHistory} from "react-router-dom";
import prev from '../../libs/img/com/prev.png'
import Draggable from 'react-draggable';
// import browserUtils from '../../libs/js/device'

function Header(props) {
    const history = useHistory();
    const [showHeader,setShowHeader] = useState(props?.showHeader==0?false:true)

    useEffect(()=>{

    },[])
    return (

        // <Draggable axis="y"
        //            handle=".handle">
        //     <div className="handle com-header"  >
        //         <div style={{cursor: 'pointer'}} onClick={(e) => {
        //             history.go(-1)
        //         }}>
        //             <img src={prev} alt=""  style={{width:'1.82rem',height:'0.84rem'}}/>
        //         </div>
        //
        //     </div>
        // </Draggable>

      <div>
          {showHeader&&(<div className='com-header' onClick={()=>{history.go(-1)}}>
              <img src={prev} alt="" style={{width:'1.82rem',height:'0.84rem'}}/>
          </div>)}
      </div>
  )
}

export default Header;